﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Net.Http;
using System.Threading.Tasks; 
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Logging;
using Newtonsoft.Json;
using XXX.Bo;
using XXX.Models.XXXEntities;

// For more information on enabling Web API for empty projects, visit https://go.microsoft.com/fwlink/?LinkID=397860

namespace XXX.api.Controllers
{
    [Route("api/account/[controller]")]
    [ApiController]
    public class AA_pdaloginController : ControllerBase
    {
      
        private readonly ILogger<AA_pdaloginController> _logger;
        public AA_pdaloginController( ILogger<AA_pdaloginController> logger)
        {
            _logger = logger;
        }

        [HttpGet]
        public Models.RetModelbool Post(string corg,string userid,string password)
        {
            //string cc = cStr;
            //Models.XXXEntities.User model = new User();
            Models.RetModelbool ret = DBService.AA_GetUserLoginU8(corg,userid, password);
            return ret;
        }


        [HttpPost]
        public Models.RetModelbool Post([FromBody]Models.XXXEntities.User model)
        {
            //string cc = cStr;
            //Models.XXXEntities.User model = new User();
                Models.RetModelbool ret = DBService.AA_GetUserLoginU8(model.corg,model.userid,model.password);
                return ret;
        }


    }
}
